package com.backend.system.controller;


import com.backend.system.beans.log.LogVO;
import com.backend.system.common.ResponseEntity;
import com.backend.system.common.annotation.WithoutLogin;
import com.backend.system.service.IOperateLogService;
import com.backend.system.util.ResponseUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 操作日志表 前端控制器
 * </p>
 *
 * @author backend-manage
 * @since 2024-04-07
 */
@Api(tags = "操作日志表 前端控制器")
@RestController
@RequestMapping("/sys/log")
public class OperateLogController {

    @Resource
    private IOperateLogService logService;

    /**
     * 依据queryId查日志
     */
    @WithoutLogin
    @GetMapping(value = "/listByQueryId")
    @ApiOperation("依据queryId查询")
    public ResponseEntity<List<LogVO>> listByQueryId(@RequestParam("queryId") String queryId) {
        return ResponseUtil.success(logService.queryByQueryId(queryId));
    }
}
